/**
 *  regdef.h - register for armulator.
 *
 *  Copyright (C) 2008-2010 ZhangHu
 *  All rights reserved.
 *  E-MAIL: anmnmnly@gmail.com
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
#ifndef __REGDEF_H_
#define __REGDEF_H_

#define regTubeRegstor    (*(volatile unsigned *)0x0d800020)

#define regIRQStatus      (*(volatile unsigned *)0x0A000000)
#define regIRQEnableSet   (*(volatile unsigned *)0x0A000008)
#define regIRQEnableClear (*(volatile unsigned *)0x0A00000c)

#define IRQ_TIMER1      0x0010
#define IRQ_TIMER2      0x0020

#define regTimer1Load     (*(volatile unsigned *)0x0A800000)
#define regTimer1Value    (*(volatile unsigned *)0x0A800004)
#define regTimer1Control  (*(volatile unsigned *)0x0A800008)
#define regTimer1Clear    (*(volatile unsigned *)0x0A80000C)

#define regTimer2Load     (*(volatile unsigned *)0x0A800020)
#define regTimer2Value    (*(volatile unsigned *)0x0A800024)
#define regTimer2Control  (*(volatile unsigned *)0x0A800028)
#define regTimer2Clear    (*(volatile unsigned *)0x0A80002C)

#define TIMER_ENABLE    0x80
#define TIMER_PERIODIC  0x40
#define TIMER_PRESCALE8 0x08


#endif

